<?php
$sql="select * from number_of_table";
$query=mysql_query($sql);
$data=mysql_fetch_assoc($query);

echo "<select id='chon_table'>";
	 for($i=1;$i<=$data['table_number'];$i++){  
		echo "<option value='$i'>Bàn số $i</option>";
	 }	
echo "</select>";
echo "&nbsp;Năm: <select id='chon_nam'>";
	$sql2="select DISTINCT EXTRACT(YEAR from date_complete) as yearcc from detail_order";
	$query2=mysql_query($sql2);
	while($data2=mysql_fetch_assoc($query2)){
		echo "<option value='$data2[yearcc]'>$data2[yearcc]</option>";
	}	
echo "</select>";
echo "&nbsp;Tháng: <select id='chon_thang' onchange='getmonth(this.value)'>";
	echo "<option value='0'>Chọn tháng</option>";
	for($j=1;$j<=12;$j++){
		echo "<option value='$j'>$j</option>";
	}
echo "</select>";
echo "<span id='ketqua'></span>";
echo "&nbsp; <button id='ok' onclick='getsum()'>Kiểm tra</button>";
echo "<div id='total'></div>";
?>
